import request from '@/utils/request'

export function fetchList(query) {
  return request({
    url: '/item/list',
    method: 'get',
    params: query
  })
}

export function create(data) {
  return request({
    url: '/item/create',
    method: 'post',
    data
  })
}

export function read(data) {
  return request({
    url: '/item/read?id='+data,
    method: 'get',
  })
}

export function update(data) {
  return request({
    url: '/item/update',
    method: 'post',
    data
  })
}

export function deleteItem(data) {
  return request({
    url: '/item/delete',
    method: 'post',
    data
  })
}
